package com.clay.appointment.common.exception;

/**
 * 异常状态枚举
 *
 * @author Yeung Wah
 * @since 2021/5/5
 */
public enum ExceptionEnum {
    /**
     * 异常枚举
     * <p>
     * 503 为通用未定义异常
     */
    SERVER_ERROR(500, "服务器异常"),
    PARAMETER_ERROR(501, "非法参数异常"),
    NULL_POINTER(502, "空值异常"),
    UNDEFINED(503, "未知异常"),
    AUTH_FAILED(504, "鉴权失败"),
    SIGN_ERROR(505,"签名错误"),
    LOGIN_DISABLED_ERROR(506,"用户已被禁用，无法登录"),
    CODE_ERROR(507,"验证码错误")
    ;
    private Integer code;
    private String message;


    ExceptionEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}